package com.proton.carepatchtemp.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;

import com.proton.carepatchtemp.utils.net.ReportCenter;

/**
 * Created by wangmengsi on 2017/11/24.
 */

public class AliyunService extends Service {
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        new Thread(() -> {
            while (true) {
                ReportCenter.getAliyunToken();
                try {
                    Thread.sleep(50 * 60 * 1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
}
